import actionInfo from "../action";
function flagReducer(state = { flag: true }, action) {
  switch (action.type) {
    case actionInfo.CHANGFLAG:
      return { flag: action.payload };
    default:
      return state;
  }
}
export  const  changeFlag = (payload)=>{
    return  {
        type:actionInfo.CHANGFLAG,
        payload
    }

}
export default flagReducer;
